home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr27 / p5math.zip / DISMATH.ASM next >
Assembly Source File  |  1995-03-20  |  2KB  |  49 lines

  1. ; DisableMath()
  2. ;
  3. ; Date of Release: 3/20/95
  4. ;
  5. ; A Clipper function to disable usage of the math coprocessor,
  6. ; intended to be called when a faulty Pentium processor is
  7. ; detected.
  8. ;
  9. ; Original author Greg Martin, Horizon Real-Time Systems,
  10. ; CompuServe ID 73707,3450.
  11. ;
  12. ; This code has been released into the public domain and may be
  13. ; used or modified in any way as long as these comments
  14. ; are preserved in the source file.
  15. ;
  16. ; This function is compatible with Clipper 5.2, 5.01, 5.0, and
  17. ; Summer '87.  It will have no affect on Clipper 5.3 since it
  18. ; uses a different math library.
  19. ;
  20. ; Explanation of function:  The __dvinit function is called at
  21. ; startup and sets an internal flag if it detects a math
  22. ; coprocessor.  This function simple gets the address of the
  23. ; internal flag from the __dvinit function and resets the flag
  24. ; to zero to disable usage of the math coprocessor.
  25. ;
  26. ; The author grants no warranties, express or implied, by
  27. ; statute or otherwise, regarding the fitness of this code for
  28. ; any purpose and in no event shall be liable for any special,
  29. ; consequential, or other damages.  Use at your own risk!
  30. ; After all this is public domain software and if $1000
  31. ; commercial software comes with such disclosures then surely
  32. ; this code qualifies too.
  33.  
  34.  
  35.                 EXTRN   __dvinit:BYTE
  36. DISMATH_TEXT    SEGMENT PUBLIC WORD 'CODE'
  37.                 ASSUME  CS:DISMATH_TEXT
  38.                 PUBLIC  DISABLEMAT
  39. DISABLEMAT:     mov     bx, seg __dvinit
  40.                 mov     es, bx
  41.                 mov     bx, offset __dvinit
  42.                 mov     bx, word ptr es:[bx+28]
  43.                 mov     word ptr [bx], 0000H
  44.                 retf
  45. DISMATH_TEXT    ENDS
  46.  
  47.                 END
  48.  
  49.